package com.ruoyi.tuanzhang.domain.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 粉丝信息  /square_pc_api/homePage/overview/fans_portrait
 */
@NoArgsConstructor
@Data
public class DarenHomeFansDataDto {

    @JsonProperty("code")
    private Integer code;
    @JsonProperty("data")
    private DataDTO data;
    @JsonProperty("log_id")
    private String logId;
    @JsonProperty("msg")
    private String msg;
    @JsonProperty("st")
    private Integer st;

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        // 性别
        @JsonProperty("gender")
        private GenderDTO gender;
        @JsonProperty("age")
        private AgeDTO age;
        @JsonProperty("city")
        private CityDTO city;
        @JsonProperty("crowd")
        private CrowdDTO crowd;
        @JsonProperty("buying_preference")
        private BuyingPreferenceDTO buyingPreference;
        @JsonProperty("consumption_level")
        private ConsumptionLevelDTO consumptionLevel;

        @NoArgsConstructor
        @Data
        public static class GenderDTO {
            // 备注：男性|| 女性
            @JsonProperty("desc")
            private String desc;
            // 比例
            @JsonProperty("ratio")
            private Double ratio;
        }

        @NoArgsConstructor
        @Data
        public static class AgeDTO {
            @JsonProperty("desc")
            private String desc;
            @JsonProperty("ratio")
            private Double ratio;
        }

        @NoArgsConstructor
        @Data
        public static class CityDTO {
            @JsonProperty("desc")
            private String desc;
            @JsonProperty("ratio")
            private Double ratio;
        }

        @NoArgsConstructor
        @Data
        public static class CrowdDTO {
            @JsonProperty("desc")
            private String desc;
            @JsonProperty("ratio")
            private Double ratio;
        }

        @NoArgsConstructor
        @Data
        public static class BuyingPreferenceDTO {
            @JsonProperty("desc")
            private String desc;
            @JsonProperty("ratio")
            private Double ratio;
            @JsonProperty("details")
            private List<DetailsDTO> details;
            @JsonProperty("title_list")
            private List<String> titleList;

            @NoArgsConstructor
            @Data
            public static class DetailsDTO {
                @JsonProperty("name")
                private String name;
                @JsonProperty("ratio")
                private Double ratio;
            }
        }

        @NoArgsConstructor
        @Data
        public static class ConsumptionLevelDTO {
            @JsonProperty("desc")
            private String desc;
            @JsonProperty("ratio")
            private Double ratio;
            @JsonProperty("details")
            private List<DetailsDTO> details;
            @JsonProperty("title_list")
            private List<String> titleList;

            @NoArgsConstructor
            @Data
            public static class DetailsDTO {
                @JsonProperty("name")
                private String name;
                @JsonProperty("ratio")
                private Double ratio;
            }
        }
    }
}
